package com.kaopu.sns.action;

 
import java.util.HashMap;
import java.util.Map;

import com.kaopu.sns.service.RssService;
import com.opensymphony.xwork2.ActionSupport;
 
import common.Logger;

public class RssAction extends ActionSupport {
	protected final Logger logger = Logger.getLogger(getClass());
	protected RssService rssService;

	private int uid = 1;
	private String username = "xuping";

	private String blogname = "";
	private int blog; 

	private String msg;

	private Map index =new   HashMap();

	public String form() {
		return SUCCESS;
	}

	public String execute() throws Exception {
		int a;
		a = rssService.saveBlog(blog, blogname, uid, username);
		a = rssService.saveQqBlog(blog, blogname, uid, username);
		index.put("blogNum", a);

		return SUCCESS;
	}

	public int getUid() {
		return uid;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getBlogname() {
		return blogname;
	}

	public void setBlogname(String blogname) {
		this.blogname = blogname;
	}

	public int getBlog() {
		return blog;
	}

	public void setBlog(int blog) {
		this.blog = blog;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Map getIndex() {
		return index;
	}

	public void setIndex(Map index) {
		this.index = index;
	}

	public RssService getRssService() {
		return rssService;
	}

	public void setRssService(RssService rssService) {
		this.rssService = rssService;
	}

}
